#ifndef	__STRING_HELPER_H__
#define	__STRING_HELPER_H__

#include<stdio.h>
#include<iostream>
#include<assert.h>
#include<math.h>

#include<vector>
#include<string>

#include<Windows.h>
#include<malloc.h>

using namespace std;

//#define DEBUG_STRING_HELPER

class StringHelper
{
private:
	/**
		Help ParseIntoArray() function.	
	*/
	static string DoSplit(string &TargetStr,const string SplitStr);
public:
	/**
		Parse TargetStr into ResultArray with SplitStr.
	*/
	static void ParseIntoArray(vector<string> &ResultArray,const string TargetStr,const string SplitStr);
	

	/*static string GetSubstrBeforeSplit(const string TargetStr,const string SplitStr);*/

	/**
		Check is TargetStr start with CheckStr.
		
		Return true 
			if start with CheckStr.
		Return false
			if not start with CheckStr.
	*/
	static bool IsStartWith(const string TargetStr,const string CheckStr);

	/**
		Check is TargetStr including CheckStr.

		Return true 
			if it include.
		Return false
			if not include.
	*/
	static bool IsInclude(const string TargetStr,const string CheckStr);


	/**
		Get string which removed SPACE.
	*/
	static string Trim(string TargetStr);


	/**
		Is TargetStr a number.
		Return true if it's a number.
		Return false if it's not a number.
	*/
	static bool IsNum(const string TargetStr);


	/**
		Parse number string into integer.
	*/
	static int ParseToInt(const string TargetStr);


	/**
		Parse string to LPCWSTR
	*/
	static LPCWSTR ParaseToLPCWSTR(const string TargetStr);
};


#endif	//	__STRING_HELPER_H__